package com.example.q_kang.hhh.order;

import com.example.q_kang.hhh.api.JsonCallBack;
import com.lzy.okgo.model.Response;
import com.sskj.base.BasePresenter;
import com.example.q_kang.hhh.order.OrderFragment;
import com.sskj.base.api.Constant;
import com.sskj.base.base.HttpData;
import com.sskj.base.bean.OrderCommmonBean;


/**
 * @author Hey
 * Create at  2019/04/09
 */
class OrderPresenter extends BasePresenter<OrderFragment> {

    public void getOrderCommonData() {
        httpService.getOrderCommmonData()
                .tag(this)
                .execute(new JsonCallBack<HttpData<OrderCommmonBean>>() {
                    @Override
                    public void onSuccess(Response<HttpData<OrderCommmonBean>> response) {
                        HttpData<OrderCommmonBean> body = response.body();
                        if (body.getStatus() == Constant.OK) {
                            mView.getOrderDataSucess(body.getData());
                        }
                    }
                });
    }

}
